//functions.h
/********************************************************************************
*																				*
*	Author:			Jared Szechy												*
*	Assignment:		Assignment 1												*
*	Class:			CPS-151														*
*	Instructor:		V. Starkley													*
*	Due Date:		August 30													*
*																				*
*	This file declares the functions needed throughout the program.				*
*																				*
********************************************************************************/

#ifndef FUNCTIONS_H
#define FUNCTIONS_H

#include <fstream>
#include "dispenser.h"
#include "cashRegister.h"
using namespace std;

void readItem(ifstream& fin, int itemNum, Dispenser disp[]);
//pre: fin is open
//post: the next item is read and stored in the dispenser class

void printInventory(ostream& fout, int numItems, Dispenser disp[]);
//pre: disp contains data
//post: displays the inventory to the screen

void tender(ostream&fout, int itemNum, Dispenser disp[], CashRegister& cash);
//pre: the item exists withing disp
//post: tenders the purchase made by customer

void writeInventory(ostream& fout, int numItems, Dispenser disp[]);
//pre: disp contains data
//post: writes current inventory to file

#endif